import { http } from '@/utils'


// 2.获取解决方案列表
export interface ListResponse {
    category: Category[];
    code: number;
    data: Datum[];
    [property: string]: any;
}

export interface Category {
    alt?: string;
    content?: string;
    default_image?: string;
    description?: string;
    id?: number;
    keywords?: null;
    router?: string;
    title?: string;
    [property: string]: any;
}

export interface Datum {
    alt: string;
    default_image: string;
    description: string;
    id: number;
    keywords: null | string;
    release_time: string;
    router: null;
    title: string;
    [property: string]: any;
}

export type ReqParams = {
    id: string | undefined
  }

export function fetchSolutionListAPI(params: ReqParams) {
    return http.request<ListResponse>({
        url: '/solution/list/',
        params,
    })
}